package com.tjsinfo.tjsoa.system.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.system.bo.ISystemDutyBo;
import com.tjsinfo.tjsoa.system.vo.TSystemDuty;
/**
 * 转向更新职位表单
 * @author 岳晓磊
 *
 */
public class UpdateToDutyAction extends Action {
	private ISystemDutyBo systemDutyBo; 
	public void setSystemDutyBo(ISystemDutyBo systemDutyBo) {
		this.systemDutyBo = systemDutyBo;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		String dutyId = request.getParameter("dutyId");
		String first = request.getParameter("first");
		TSystemDuty tsd = systemDutyBo.findById(dutyId);
		request.setAttribute("tsd", tsd);
		request.setAttribute("first", first);
		return mapping.findForward("success");
	}
}
